<template>
  <div>
    <h2>{{info}}</h2>
    <button @click="changeInfo">变老</button>
  </div>
</template>

<script>
import { ref } from 'vue';
export default {
  setup(){
    const info = ref({name:"wmy"})
    
    const changeInfo = () => {
      info.value.name = "wj"
    }
    
    return{
        info,
      changeInfo
    }
  }

}
</script>

<style scoped>

</style>